using NaughtyAttributes;
using UnityEngine;

namespace Gj
{
    public class RectExtend : MonoBehaviour
    {
        public RectTransform[] list;

        [Button]
        public float GetHeight()
        {
            float height = 0;
            for (var i = 0; i < list.Length; i++)
                if (list[i].rect.height > height)
                    height = list[i].rect.height;

            return height;
        }

        [Button]
        public float GetWidth()
        {
            float width = 0;
            for (var i = 0; i < list.Length; i++)
                if (list[i].rect.width > width)
                    width = list[i].rect.width;

            return width;
        }
    }
}